
export const defaultWithIApi: IApi = {
  id: -1,
  moduleId: -1,
  environmentId: -1,
  databaseId: -1,
  type: '',
  engineType: 'API',
  name: '默认名称',
  cyclesNum: 1,
  description: '无描述',
  level: 'p0',
  // path: '/',
  // method: 'GET',
  // query: '[]',
  rest: '[]',
  // header: '[]',
  // body: '[]',
  // bodyType: 'JSON',
  arguments:'[]',
  sqlText: '',
  isRetry: false,
  retryType: "同步",
  retryCount: 1,
  retryFirstInterval: 3,
  startProxy: false,
  proxyId: null,
  createAccountId: '',
  updateAccountId: '',
  gmtCreate: new Date(),
  gmtModified: new Date(),
}

export interface IApi {
  id: number
  moduleId: number
  environmentId: number
  databaseId: number
  type: string
  engineType:string
  name: string
  cyclesNum: number
  description?: string
  level: 'p0' | 'p1' | 'p2' | 'p3'
  // path: string
  // method: string
  // query: string
  rest: string
  // header: string
  // body: string
  // bodyType: BodyType
  arguments: string
  sqlText: string
  isRetry: boolean
  retryType: string
  retryCount: number
  retryFirstInterval: number
  startProxy: boolean,
  proxyId: number | null,
  createAccountId: string
  updateAccountId: string
  gmtCreate: Date
  gmtModified: Date
}
